package com.qk.management.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.qk.common.PageResult;
import com.qk.entity.OperateLog;
import com.qk.management.mapper.OperateLogMapper;
import com.qk.management.service.OperateLogService;
import com.qk.vo.operateLog.OperateLogVO;
import org.springframework.stereotype.Service;

/*
 *  @author SHCJ
 *  @created 2025/10/17 19:46
 *  @description
 */
@Service
public class OperateLogServiceImpl extends ServiceImpl<OperateLogMapper, OperateLog> implements OperateLogService {
    @Override
    public PageResult<OperateLogVO> selectByPage(Integer page, Integer pageSize, String operateUserName) {
        PageHelper.startPage(page, pageSize);
        PageInfo<OperateLogVO> pageInfo = new PageInfo<>(this.baseMapper.selectByPage(operateUserName));
        return new PageResult<>(pageInfo.getTotal(), pageInfo.getList());
    }
}
